import request from '@/utils/request'
// import { makeFormData } from '@/utils/util'

const api = {
  dirList: 'api/document_dir/list',
  dirSubmit: 'api/document_dir',
  docList: 'api/yz/live/list',
  docSubmit: 'api/documents'
}

export function getDirList (params = {}) {
  return request({
    url: api.dirList,
    method: 'get',
    params
  })
}

export function getDocList (params = {}) {
  return request({
    url: api.docList,
    method: 'get',
    params
  })
}

export function dirSubmit (params = {}, method = 'post') {
  return request({
    url: api.dirSubmit,
    method,
    params
  })
}

export function docSubmit (params = {}, method = 'post') {
  return request({
    url: api.docSubmit,
    method,
    params
  })
}

export function playurlRequest (params = {}) {
  return request({
    url: 'api/yz/live/playurl',
    method: 'get',
    params
  })
}
